import Guide from '~/components/layout/guide'
import Snippet from '~/components/snippet'
import { InlineCode } from '~/components/text/code'
import Caption from '~/components/text/caption'

export const meta = {
  title: 'How to Update Now CLI',
  description: 'Update Now CLI using a package manager.',
  published: '2019-03-20T03:00:00.860Z',
  authors: ['msweeneydev', 'timothy'],
  url: '/guides/updating-now-cli',
  editUrl: 'pages/guides/updating-now-cli.mdx',
  lastEdited: '2020-01-20T21:51:41.000Z'
}

When there is a new release of the [Now CLI](https://zeit.co/download#now-cli) available, you will see a message appear in your terminal output when running ZEIT Now, letting you know that there is a newer version.

This guide will take you through your options for updating Now CLI using your preferred package manager.

## Option 1: Updating via npm

If you have installed our command-line interface via [npm](http://npmjs.org/), the easiest way to update it is by running the installation command yet again:

<Snippet dark text="npm i -g now" />
<Caption>Updating Now CLI using the <InlineCode>npm</InlineCode> command.</Caption>

In the case that permission errors are preventing you from installing, please read npm's [official guide](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) about this problem.

## Option 2: Updating via Yarn

If you have installed our command-line interface via [Yarn](https://yarnpkg.com), the easiest way to update it is by running the installation command yet again:

<Snippet dark text="yarn global add now" />
<Caption>Updating Now CLI using the <InlineCode>yarn</InlineCode> command.</Caption>

In the case that permission errors are preventing you from installing, please read npm's [official guide](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) about this problem (Yarn depends on the same configuration).

export default ({ children }) => <Guide meta={meta}>{children}</Guide>

export const config = {
  amp: 'hybrid'
}
